package com.wanxi.web.service.product.impl;

import com.wanxi.product.service.api.feign.ProductShopService;
import com.wanxi.product.service.api.query.shop.SkuQueryShop;
import com.wanxi.product.service.api.result.CommonResult;
import com.wanxi.product.service.api.vo.shop.*;
import com.wanxi.repertory.service.api.feign.RepertoryShopService;
import com.wanxi.repertory.service.api.vo.RepertoryTotalUpdateInVo;
import com.wanxi.web.service.product.ProductShopWebService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProductShopWebServiceImpl implements ProductShopWebService {
    @Resource
    private ProductShopService productService;

    @Resource
    private RepertoryShopService repertoryShopService;

    @Override
    public CommonResult<List<SkuFindAllOutVo>> findAllSku(SkuQueryShop skuQuery) {
        return productService.findAllSku(skuQuery);
    }

    @Override
    public CommonResult<SkuFindByIdOutVo> findSkuById(Long skuId) {
        return productService.findSkuById(skuId);
    }

    @Override
    public CommonResult skuOnShelvesAndOffShelves(SkuShelvesInVo skuShelvesInVo) {
        return productService.skuOnShelvesAndOffShelves(skuShelvesInVo);
    }

    @Override
    public com.wanxi.repertory.service.api.result.CommonResult<List<Long>> findSkuIdByShopId(Long shopId) {
        return repertoryShopService.findSkuIdByShopId(shopId);
    }

    @Override
    public com.wanxi.repertory.service.api.result.CommonResult updateTotal(RepertoryTotalUpdateInVo repertoryUpdateInVo) {
        return repertoryShopService.updateTotal(repertoryUpdateInVo);
    }
}
